<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      layout:decorate="main">
<head>
    <meta charset="UTF-8">
    <title>客户开发计划</title>
    <link th:href="@{/static/localcss/userlist.css}" href="../../static/localcss/userlist.css" rel="stylesheet">
    <link href="../static/city/css/city-picker.css" th:href="@{/city/css/city-picker.css}" rel="stylesheet">
    <script th:src="@{/localjs/rollpage.js}" src="../static/localjs/rollpage.js"></script>
    <script th:src="@{/js/jquery.min.js}" src="../static/js/jquery.min.js"></script>
    <script src="../static/city/js/city-picker.data.js" th:src="@{/city/js/city-picker.data.js}"></script>
    <script src="../static/city/js/city-picker.js" th:src="@{/city/js/city-picker.js}"></script>
    <script src="../static/city/js/main.js" th:src="@{/city/js/main.js}"></script>
</head>
<body>
    <div layout:fragment="content">
        <div class="clearfix"></div>
        <div class="row">

            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2>
                         客户信息管理<i class="fa fa-group"></i>
                        </h2>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <form action="list.html" th:action="@{/cust/list}" method="post">
                            <ul>
                                <li>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">客户名称</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input name="custName" type="text"
                                                   class="form-control col-md-7 col-xs-12"
                                                   th:value="${custName}" value="">
                                        </div>
                                    </div>
                                </li>

                                <li>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">客户编号</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input name="custNo" type="text"
                                                   class="form-control col-md-7 col-xs-12"
                                                   th:value="${custNo}" value="">
                                        </div>
                                    </div>
                                </li>

                                <li>
                                    <div class="form-group">
                                        <label class="control-label col-md-5 col-sm-5 col-xs-12">所在地区</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                             <input id="city-picker3" class="form-control"  type="text" data-toggle="city-picker">
                                        </div>
                                    </div>
                                </li>

                                <li>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">负责人&nbsp;</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <input name="custManagerName" type="text"
                                                   class="form-control col-md-7 col-xs-12"
                                                   th:value="${custManagerName}" value="">
                                        </div>
                                    </div>
                                </li>

                                <li>
                                    <div class="form-group">
                                        <label class="control-label col-md-3 col-sm-3 col-xs-12">客户等级</label>
                                        <div class="col-md-6 col-sm-6 col-xs-12">
                                            <select class="form-control">
                                                <option value="">--请选择--</option>
                                                <option value="普通客户">普通客户</option>
                                                <option value="VIP">VIP</option>
                                                <option value="SVIP">SVIP</option>
                                                <option value="特别关注">特别关注</option>
                                            </select>
                                        </div>
                                    </div>
                                </li>

                                <li>
                                    <button type="submit" class="btn btn-primary">查
                                        &nbsp;&nbsp;&nbsp;&nbsp;询</button>
                                </li>
                            </ul>
                        </form>
                    </div>
                </div>
            </div>

            <div class="col-md-12 col-sm-12 col-xs-12">
                <div class="x_panel">
                    <div class="x_title">
                        <h2 >
                            客户信息列表
                        </h2>
                        <ul class="nav navbar-right panel_toolbox">
                            <li>
                                <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                            </li>
                        </ul>
                        <div class="clearfix"></div>
                    </div>
                    <div class="x_content">
                        <p class="text-muted font-13 m-b-30"></p>
                        <div id="datatable-responsive_wrapper"
                             class="dataTables_wrapper form-inline dt-bootstrap no-footer">
                            <div class="row">
                                <div class="col-sm-12">
                                    <div class="col-sm-12">
                                        <a th:href="@{/cust/add}" href="../cust/add"
                                           class="btn btn-success btn-sm">新增客户信息</a>
                                    <table id="datatable-responsive"
                                           class="table table-striped table-bordered dt-responsive nowrap dataTable no-footer dtr-inline collapsed"
                                           cellspacing="0" width="100%" role="grid"
                                           aria-describedby="datatable-responsive_info"
                                           style="width: 100%;">

                                        <thead>
                                        <tr role="row">
                                            <th class="sorting_asc" tabindex="0"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="First name: activate to sort column descending"
                                                aria-sort="ascending">序号
                                            </th>
                                            <th class="sorting" tabindex="1"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="Last name: activate to sort column ascending">
                                                客户名称
                                            </th>
                                            <th class="sorting" tabindex="2"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="Last name: activate to sort column ascending">
                                                客户编号
                                            </th>
                                            <th class="sorting" tabindex="3"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="Last name: activate to sort column ascending">
                                                所在地区
                                            </th>
                                            <th class="sorting" tabindex="4"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="Last name: activate to sort column ascending">
                                                负责人
                                            </th>
                                            <th class="sorting" tabindex="5"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                aria-label="Last name: activate to sort column ascending">
                                                客户等级
                                            </th>
                                            <th class="sorting" tabindex="6"
                                                aria-controls="datatable-responsive" rowspan="1" colspan="1"
                                                style="width: 124px;"
                                                aria-label="Last name: activate to sort column ascending">
                                                操作
                                            </th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        <tr th:each="cust,status : ${customerPage.content}" role="row" class="odd">
                                            <td th:text="${status.index+1}">序号</td>
                                            <td th:text="${cust.custName}">客户名称</td>
                                            <td><span th:text="${cust.custNo}">客户编号</span></td>
                                            <td><span th:text="${cust.custRegion}">所在地区</span></td>
                                            <td><span th:text="${cust.custManagerName}">负责人</span> </td>
                                            <td><span th:text="${cust.custLevel}">客户等级</span></td>
                                            <td>
                                                <div class="btn-group">
                                                    <button type="button" class="btn btn-danger">点击操作</button>
                                                    <button type="button"
                                                            class="btn btn-danger dropdown-toggle"
                                                            data-toggle="dropdown" aria-expanded="false">
                                                        <span class="caret"></span> <span class="sr-only">Toggle
															Dropdown</span>
                                                    </button>
                                                    <ul class="dropdown-menu" role="menu">
                                                        <li>
                                                            <a th:href="@{/cust/toedit(custNo=${custNo})}"
                                                               class="toEdit"
                                                               data-toggle="tooltip" data-placement="top" title=""
                                                               data-original-title="编辑">编辑</a>
                                                        </li>
                                                        <li>
                                                            <a th:href="@{/cust/linkMan(chcId=${cust.custNo})}"
                                                               class="Linkman"
                                                               data-toggle="tooltip" data-placement="top" title=""
                                                               data-original-title="联系人">联系人</a>
                                                        </li>
                                                        <li>
                                                            <a th:href="@{/plan/execute(chcId=${chance.chcId})}"
                                                               class="executePlan"
                                                               data-toggle="tooltip" data-placement="top" title=""
                                                               data-original-title="交往记录">交往记录</a>
                                                        </li>
                                                        <li>
                                                            <a th:href="@{/chance/edit(chcId=${chance.chcId})}"
                                                               class="LostOrder"
                                                               data-toggle="tooltip" data-placement="top" title=""
                                                               data-original-title="历史订单">历史订单</a>
                                                        </li>
                                                        <li>
                                                             <a th:href="@{/cust/del(custNo=${cust.custNo})}"
                                                               class="delCustomer"
                                                               data-toggle="tooltip" data-placement="top" title=""
                                                               data-original-title="删除">删除</a>
                                                        </li>
                                                    </ul>
                                                </div>
                                            </td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-sm-5">
                                    <div class="dataTables_info" id="datatable-responsive_info"
                                         role="status" aria-live="polite">共<span th:text="${customerPage.totalElements}">999</span>条记录
                                        <span th:text="${customerPage.number + 1}"></span>/<span th:text="${customerPage.totalPages}"></span>页
                                    </div>
                                </div>
                                <div class="col-sm-7">
                                    <div class="dataTables_paginate paging_simple_numbers"
                                         id="datatable-responsive_paginate">
                                        <ul class="pagination">
                                            <li class="paginate_button previous" th:if="${customerPage.number gt 0}"><a
                                                    href="javascript:page_nav(document.forms[0],1);"
                                                    aria-controls="datatable-responsive" data-dt-idx="0"
                                                    tabindex="0">首页</a></li>
                                            <li class="paginate_button " th:if="${customerPage.number gt 0}"><a
                                                    href="#" th:onclick="'javascript:page_nav(document.forms[0],'+${customerPage.number}+');'"
                                                    aria-controls="datatable-responsive" data-dt-idx="1"
                                                    tabindex="0">上一页</a></li>
                                            <li class="paginate_button " th:if="${(customerPage.number+1) lt customerPage.totalPages}"><a
                                                    href="#" th:onclick="'javascript:page_nav(document.forms[0],'+${customerPage.number+2}+');'"
                                                    aria-controls="datatable-responsive" data-dt-idx="1"
                                                    tabindex="0">下一页</a></li>
                                            <li class="paginate_button next" th:if="${(customerPage.number+1) lt customerPage.totalPages}"><a
                                                    href="#" th:onclick="'javascript:page_nav(document.forms[0],'+${customerPage.totalPages}+');'"
                                                    aria-controls="datatable-responsive" data-dt-idx="7"
                                                    tabindex="0">最后一页</a></li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>